package com.easy.dn.ui.usercenter.model;

import com.easy.dn.api.Api;
import com.easy.dn.api.ApiService;
import com.easy.dn.bean.UserInfoBean;
import com.easy.dn.ui.usercenter.contract.LoginContract;

import java.util.Map;

import rx.Observable;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

/**
 * Created by DN on 2017/5/3.
 */


public class LoginModel implements LoginContract.Model {
    @Override
    public Observable<UserInfoBean> ObtainUserInfoData(Map<String, String> map) {
        return Api.getInstance().getProxy(ApiService.class).getUserInfo(Api.getCacheControl(), map).
                subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());
    }
}
